package org.JQbitorrentClinet.request.torrentmanagement;

import lombok.Builder;
import org.JQbitorrentClinet.base.BaseGetUrlEncodedParam;
import com.google.gson.reflect.TypeToken;

import java.util.List;

@Builder
public class GetTorrentPiecesHashesParam extends BaseGetUrlEncodedParam {
    String hash;

    public GetTorrentPiecesHashesParam(String hash) {
        super();
        this.hash = hash;
        responseType = new TypeToken<List<String>>() {
        }.getType();
    }

    @Override
    public String getApiUrl() {
        return "/api/v2/torrents/pieceHashes";
    }
}
